package com.g24.partychecker;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

public class Website extends Activity
{
	WebDBAdapter webdb;
	
	@Override
    public void onCreate(Bundle savedInstanceState) 
    {
		super.onCreate(savedInstanceState);
		
		WebView webview = new WebView(this);
		setContentView(webview);
		
		Intent i = getIntent();
		Bundle b = i.getExtras();
		String newID = b.getString("FEESTID");
		
		try 
		{
			webdb = new WebDBAdapter();
			String c = webdb.getDataUrl(newID);
			System.out.println(c);
			
			webview.getSettings().setJavaScriptEnabled(true);
			webview.setWebViewClient(new MyWebViewClient());
			webview.loadUrl("http://" + c + "/");
		} 
		catch (Exception e) 
		{
			e.printStackTrace();
		}
    }
}